package views;

import models.TrueFalseQuestion;
import mvc.AbstractView;
import mvc.IController;

public class TrueFalseQView extends AbstractView
{

	public TrueFalseQView(IController controller, TrueFalseQuestion question)
	{
		super(controller);
		itsTrueFalseQuestion = question;
	}

	@Override
	public void onInputString(String str)
	{	
	}

	@Override
	public void update()
	{
		String s = new String();
		s = itsTrueFalseQuestion.getCaption();
		if(itsTrueFalseQuestion.getItsIAnswer() != null && 
			itsTrueFalseQuestion.getPermission() == 0)
		{
			s += "\nANSWER:\n" + itsTrueFalseQuestion.getItsIAnswer().getText();
		}
		System.out.println(s);
	}
	
	private TrueFalseQuestion itsTrueFalseQuestion;
}
